//
//  GiftViewController.m
//  GiftNote
//
//  Created by wsh on 15/8/12.
//  Copyright (c) 2015年 GN. All rights reserved.
//

#import "GiftViewController.h"
#import "MultilevelMenu.h"
#import "Screen.h"
#import "ChooseGiftView.h"
#import "ChooseGiftViewController.h"

@interface GiftViewController ()
@property (nonatomic, strong) MultilevelMenu *view1;
@property (nonatomic, strong) ChooseGiftView *chooseView;
@end

@implementation GiftViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    _chooseView = [[ChooseGiftView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 40)];
    _chooseView.backgroundColor = [UIColor whiteColor];
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(chooseAction)];
    [_chooseView addGestureRecognizer:tap];
    
    
    //  适配 ios 7 和ios 8 的 坐标系问题
    self.automaticallyAdjustsScrollViewInsets = NO;
    _view1=[[MultilevelMenu alloc] initWithFrame:CGRectMake(0, 40, SCREEN_WIDTH, SCREEN_HEIGHT - 64 - 49 - 40) ];
    
    _view1.needToScorllerIndex = 0;
    
    _view1.isRecordLastScroll = YES;

    _view1.nac = self.nac;
    
    
    [self.view addSubview:_chooseView];
    [self.view addSubview:_view1];
}



- (void)chooseAction{

    ChooseGiftViewController *chooseVC = [[ChooseGiftViewController alloc] init];
    
    [self.nac pushViewController:chooseVC animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}
@end
